package wrapper;

public class IntegerDemo {
    public static void main(String[] args) {
        Integer i1 = new Integer(100);
        Integer i2 = new Integer(100);
        System.out.println(i1==i2);
        System.out.println(i1.equals(i2));

        Integer i3 = Integer.valueOf(100);
        Integer i4 = Integer.valueOf(100);
        System.out.println(i3==i4);
        System.out.println(i3.equals(i4));

        int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println(max+","+min);

        long maxLong = Long.MAX_VALUE;
        long minLong = Long.MIN_VALUE;
        System.out.println(maxLong+","+minLong);

        String s1 = "40";
        int age = Integer.parseInt(s1);
        String s2 = "123.123";
        double d = Double.parseDouble(s2);
        System.out.println(age+","+d);
    }
}
